package tw.factory;

public class factoryTest {
    public static void main(String[] args) {

        //将会根据第一个参数type，来告诉工厂需要时生产什么对象

        //根据“pc”去工厂生产PC对象
        Computer pc = ComputerFactory.getComputer("pc","2 GB","500 GB","2.4 GHz");
        //根据“server”来生产Server类型的对象
        Computer server = ComputerFactory.getComputer("server","16 GB","1 TB","2.9 GHz");
        System.out.println("Factory PC Config::"+pc);
        System.out.println("Factory Server Config::"+server);
    }
}
